package com.oocl.o2o.merchant.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;
/**
 * 投诉实体
 * @author XIEMI2
 *
 */
@Entity
@GenericGenerator(name = "complaint_info_id_generator", strategy = "uuid")
public class ComplaintInfo {
	@GeneratedValue(generator = "complaint_info_id_generator")
	@Id
	@Column(columnDefinition = "char(32)")
	String id;
	@ManyToOne
	@JoinColumn(name = "merchant_id",columnDefinition="char(32)")
	private Merchant merchant;
	@ManyToOne
	@JoinColumn(name = "customer_id",columnDefinition="char(32)")
	private Customer customer;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="complain_date")
	private Date complainDate; 
	private String compaintContent; 
	
	public ComplaintInfo() {
		super();
	}
	public ComplaintInfo(String id, Merchant merchant, Customer customer, Date complainDate, String compaintContent) {
		super();
		this.id = id;
		this.merchant = merchant;
		this.customer = customer;
		this.complainDate = complainDate;
		this.compaintContent = compaintContent;
	}
	public String getId() {
		return id;
	}

	public Merchant getMerchant() {
		return merchant;
	}
	public void setMerchant(Merchant merchant) {
		this.merchant = merchant;
	}
	public Customer getCustomer() {
		return customer;
	}
	public void setCustomer(Customer customer) {
		this.customer = customer;
	}
	public Date getComplainDate() {
		return complainDate;
	}
	public void setComplainDate(Date complainDate) {
		this.complainDate = complainDate;
	}
	public String getCompaintContent() {
		return compaintContent;
	}
	public void setCompaintContent(String compaintContent) {
		this.compaintContent = compaintContent;
	}
	

	
}
